import java.util.Scanner;

import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        pascalTriangle(n);
    }
    public static void pascalTriangle(int n) {
        int[] a = new int[n];
        int[] tmp = new int[n];
        System.out.println(1);
        if(n == 1) return;
        System.out.println(1 + " " + 1);
        if(n == 2) return;
        tmp = new int[]{1,1};
        for(int i = 2;i < n;i++) {
            a[0] = 1;
            for(int j = 1;j < i;j++) {
                a[j] = tmp[j] + tmp[j-1];
            }
            a[i] = 1;
            for(int j = 0;j < i;j++) {
                System.out.print(a[j] + " ");
            }
            System.out.println(a[i]);
            tmp = Arrays.copyOf(a,i+1);
        }
    }
}